﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Business_In.aspx.cs" Inherits="Business_Business_In"   %>
<%@ Import Namespace="Common" %>
<%@ Import Namespace="DAL" %>
<%@ Register src="../common/Pager.ascx" tagname="Pager" tagprefix="uc2" %>

<script language="JavaScript" type="text/javascript" src="../common/common.js" ></script>
<script language="javascript" type="text/javascript" src="../common/selectDateTime.js"></script>
<script src="../common/jquery.min.js" type="text/javascript"></script>
<script src="../common/jquery-1.1.3.1.pack.js" type="text/javascript"></script>
<script src="../common/thickbox_in.js" type="text/javascript"></script>
<script src="../common/global.js" type="text/javascript"></script>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
<link href="../css/menu.css" rel="stylesheet" type="text/css" />
<link href="../css/Pager.css" rel="stylesheet" type="text/css" />
<link href="../css/thickbox.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            height: 25px;
            width: 138px;
        }
    </style>
<form id="form1" runat="server">
    <table cellpadding="0" cellspacing="2" width="100%" border="0">
	<tr>
		<td width="100%" valign="top">
		<table cellpadding="0" cellspacing="0" width="100%" border="0" align="center">
			<tr>
		        <td class="leftTd"  valign="top">
		        <table cellpadding="0" cellspacing="0" width="100%" border="0" align="center">
		        	<tr>
		            	<td class="titleStyle">
		            	<%= "预约状态 >> 未完成 >> " + WebUtility.GetTypeName(Convert.ToInt32(Type))%>
		            	</td>
		            </tr>
		        </table>
		        <br />
		        <table width="98%" border="0" cellpadding="0" cellspacing="1" align="center" bgcolor="#000066">
	                <tr>
		                <td style="height: 30px;" colspan="14" class="banma22_1">&nbsp;任务类型：
			                <asp:DropDownList ID="ClsID" runat="server">
                              <asp:ListItem Value="">- 请选择任务类型 - </asp:ListItem>
                            </asp:DropDownList>&nbsp;
                            预约/任务状态：
			                <asp:DropDownList ID="txt_Type" runat="server">
                              <asp:ListItem Value="">- 请选择预约/任务类型-</asp:ListItem>
                              <asp:ListItem Value="1">┣&nbsp;任务已提交</asp:ListItem>
                              <asp:ListItem Value="2">┣&nbsp;任务已分配</asp:ListItem>
                              <asp:ListItem Value="4">┣&nbsp;任务处理中</asp:ListItem>
                              <asp:ListItem Value="5">┣&nbsp;任务未完成</asp:ListItem>
                              <asp:ListItem Value="6">┣&nbsp;任务已完成</asp:ListItem>
                            </asp:DropDownList>
	                        &nbsp;标题关键字：<asp:TextBox ID="Keyword" runat="server" Width="60px" CssClass="face"></asp:TextBox>&nbsp;&nbsp;
	                        <asp:TextBox ID="OneDate" runat="server" Width="70px" CssClass="face" Text="选择开始日期"></asp:TextBox>
	                        &nbsp;&nbsp;<asp:TextBox ID="TwoDate" runat="server" Width="70px" CssClass="face" Text="选择结束日期"></asp:TextBox>&nbsp;&nbsp;
                            <asp:Button ID="submit" runat="server" Text=" 搜 索 " CssClass="button" 
                                onclick="submit_Click" />
		                </td>
	                </tr>
                    <asp:Repeater ID="Re_News" runat="server" onitemcommand="Re_News_ItemCommand" 
                        onitemdatabound="Re_News_ItemDataBound">
                       <HeaderTemplate>
                           <tr>
                            <td style="height: 30px; width: 5%;" class="banma1 TextCenters">序号</td>
                            <td style="width: 9%;" class="banma1 TextCenters">预约状态</td>
                            <td style="width: 6%;" class="banma1 TextCenters">服务工程师</td>
                            <td style="height: 30px; width: 7%;" class="banma1 TextCenters">客户名称</td>
		                    <td style="height: 30px; width: 7%;" class="banma1 TextCenters">服务类型</td>
		                    <td style="width: 10%;" class="banma1 TextCenters">预约描述</td>
		                    <td id="SheduleTime" runat="server" style="width: 12%;" class="banma1 TextCenters">预约处理时段</td>
		                    <td id="DoTime" runat="server" style="width: 12%;" class="banma1 TextCenters">处理时间段</td>
		                    <td style="width: 8%;" class="banma1 TextCenters">服务时间</td>
		                    <td style="width: 8%;" class="banma1 TextCenters">操作时间</td>
		                    <td style="width: 6%;" class="banma1 TextCenters">操作人</td>
		                    <td style="width: 7%;" class="banma1 TextCenters">操作</td>
	                       </tr>
                       </HeaderTemplate>
                       <ItemTemplate>
                           <tr>
                            <td class="banma22_2" style="height: 25px; text-align: center;">
                            <a class="thickbox" href="../Business/Business_View.aspx?NewsKey=<%# Eval("NewsKey") %>&KeepThis=true&TB_iframe=true&height=550&width=650">
                            <%# Eval("DanNum")%></a>
                            <asp:Panel ID="P_Fetch" runat="server" Visible='<%# Convert.ToInt32(Eval("ClsID"))==4?true:false %>'>
                            送/取：<%# Eval("Fetch_FetchType")%><br>
                            单 号：<%# Eval("Fetch_DanNum")%>
                            </asp:Panel>
                            <asp:Panel ID="P_Quote" runat="server" Visible='<%# Convert.ToInt32(Eval("ClsID"))==6?true:false %>'>
                            报价：<%# Eval("Quote_StockType")%><br>
                            状态：<%# Eval("Quote_IsQuote")%><br>
                            价格：<%# Eval("Quote_Price").ToString() == "0" ? "" : Eval("Quote_Price").ToString() %>
                            </asp:Panel>
                            </td>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Eval("TypeName")%></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Eval("MRealName")%></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;">
                            <a class="thickbox" href="../System/User_View.aspx?UserKey=<%# Eval("UserID") %>&KeepThis=true&TB_iframe=true&height=350&width=650">
                            <%# new Account().GetAccountShortCompanyName(Convert.ToInt32(Eval("UserID")))+"," + Eval("UserName").ToString() %></a></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Eval("ClsName")%></td>
                            <td class="banma22_2" style="height: 25px; text-align: left;">
                            <a class="thickbox" href="../Business/Business_View.aspx?NewsKey=<%# Eval("NewsKey") %>&KeepThis=true&TB_iframe=true&height=550&width=650" ><%# WebUtility.GetStringByLen(Eval("Content_Cus").ToString(), 20)%></a>
                            </td>
		                    <td id="SheduleTime" runat="server" class="banma22_2" style="height: 25px; text-align: center;"><%# WebUtility.DateTimeToShort(Eval("TechOneTime")) %><br><%# WebUtility.DateTimeToShort(Eval("TechTwoTime")) %></td>
		                    <td id="DoTime" runat="server" class="banma22_2" style="height: 25px; text-align: center;"><%# WebUtility.DateTimeToShort(Eval("TechFiveTime")) %><br><%# WebUtility.DateTimeToShort(Eval("TechSixTime"))%></td>
		                    <td class="banma22_2" style="height: 25px; text-align: center;">
		                    <%# WebUtility.GetTimeSpanH(Eval("TechFiveTime"), Eval("TechSixTime"))%><%# WebUtility.GetTimeSpanM(Eval("TechFiveTime"), Eval("TechSixTime"))%></td>
		                    <td class="banma22_2" style="height: 25px; text-align: center;"><%# WebUtility.DateTimeToString(Eval("UpdateTime"))%></td>
		                    <td class="banma22_2" style="height: 25px; text-align: center;">
		                    <a class="thickbox" href="../System/User_View.aspx?UserKey=<%# Eval("UserKey") %>&KeepThis=true&TB_iframe=true&height=350&width=650">
		                    <%# GetUserRealName(Convert.ToInt32(Eval("UserKey")))%></a></td>
		                    <td class="banma22_2" style="height: 25px; text-align: center;">
                                <asp:LinkButton ID="del" runat="server" CommandName="del" CommandArgument='<%#Eval("NewsKey") %>' OnClientClick="return confirm('确认删除？');">删除</asp:LinkButton>
                                <% if (UserType == 2 || UserType == 4) { %> 
                                <a style="display:<%# Eval("Type").ToString()=="1"?"block":"none" %>" class="thickbox" href="../Business/Business_Shedule.aspx?menutype=<%= MenuType %>&Type=<%= Type %>&NewsKey=<%# Eval("NewsKey") %>&KeepThis=true&TB_iframe=true&height=550&width=650">任务分配</a>
                                <% } %>
                                <% if (UserType == 2 || UserType == 3 || UserType == 4) { %> 
                                <a style="display:<%# Eval("Type").ToString()!="1"?"block":"none" %>" class="thickbox" href="../Business/Business_Do.aspx?menutype=<%= MenuType %>&Type=<%= Type %>&NewsKey=<%# Eval("NewsKey") %>&KeepThis=true&TB_iframe=true&height=550&width=650">任务处理</a>
		                        <% } %>
		                    </td>
	                       </tr>
                       </ItemTemplate>
                       <AlternatingItemTemplate>
                            <tr>
                            <td class="banma22_1" style="height: 25px; text-align: center;">
                            <a class="thickbox" href="../Business/Business_View.aspx?NewsKey=<%# Eval("NewsKey") %>&KeepThis=true&TB_iframe=true&height=550&width=650">
                            <%# Eval("DanNum")%></a>
                            <asp:Panel ID="P_Fetch" runat="server" Visible='<%# Convert.ToInt32(Eval("ClsID"))==4?true:false %>'>
                            送/取：<%# Eval("Fetch_FetchType")%><br>
                            单 号：<%# Eval("Fetch_DanNum")%>
                            </asp:Panel>
                            <asp:Panel ID="P_Quote" runat="server" Visible='<%# Convert.ToInt32(Eval("ClsID"))==6?true:false %>'>
                            报价：<%# Eval("Quote_StockType")%><br>
                            状态：<%# Eval("Quote_IsQuote")%><br>
                            价格：<%# Eval("Quote_Price").ToString() == "0" ? "" : Eval("Quote_Price").ToString() %>
                            </asp:Panel>
                            </td>
                            <td class="banma22_1" style="height: 25px; text-align: center;"><%# Eval("TypeName")%></td>
                            <td class="banma22_2" style="height: 25px; text-align: center;"><%# Eval("MRealName")%></td>
                            <td class="banma22_1" style="height: 25px; text-align: center;">
                            <a class="thickbox" href="../System/User_View.aspx?UserKey=<%# Eval("UserID") %>&KeepThis=true&TB_iframe=true&height=550&width=650">
                            <%# new Account().GetAccountShortCompanyName(Convert.ToInt32(Eval("UserID")))+"," + Eval("UserName").ToString() %></a></td>
                            <td class="banma22_1" style="height: 25px; text-align: center;"><%# Eval("ClsName")%></td>
                            <td class="banma22_1" style="height: 25px; text-align: left;">
                            <a class="thickbox" href="../Business/Business_View.aspx?NewsKey=<%# Eval("NewsKey") %>&KeepThis=true&TB_iframe=true&height=550&width=650"><%# WebUtility.GetStringByLen(Eval("Content_Cus").ToString(), 20)%></a>
                            </td>
		                    <td id="SheduleTime" runat="server" class="banma22_1" style="height: 25px; text-align: center;"><%# WebUtility.DateTimeToShort(Eval("TechOneTime")) %><br><%# WebUtility.DateTimeToShort(Eval("TechTwoTime")) %></td>
		                    <td id="DoTime" runat="server" class="banma22_1" style="height: 25px; text-align: center;"><%# WebUtility.DateTimeToShort(Eval("TechFiveTime"))%><br><%# WebUtility.DateTimeToShort(Eval("TechSixTime")) %></td>
		                    <td class="banma22_1" style="height: 25px; text-align: center;">
		                    <%# WebUtility.GetTimeSpanH(Eval("TechFiveTime"), Eval("TechSixTime"))%><%# WebUtility.GetTimeSpanM(Eval("TechFiveTime"), Eval("TechSixTime"))%></td>
		                    <td class="banma22_1" style="height: 25px; text-align: center;"><%# WebUtility.DateTimeToString(Eval("UpdateTime"))%></td>
		                    <td class="banma22_1" style="height: 25px; text-align: center;">
		                    <a class="thickbox" href="../System/User_View.aspx?UserKey=<%# Eval("UserKey") %>&KeepThis=true&TB_iframe=true&height=350&width=650">
		                    <%# GetUserRealName(Convert.ToInt32(Eval("UserKey")))%></a></td>
		                    <td class="banma22_1" style="height: 25px; text-align: center;">
		                       <asp:LinkButton ID="del" runat="server" CommandName="del" CommandArgument='<%#Eval("NewsKey") %>' OnClientClick="return confirm('确认删除？');">删除</asp:LinkButton>
		                       <% if (UserType == 2 || UserType == 4) {  %>
                                <a style="display:<%# Eval("Type").ToString()=="1"?"block":"none" %>" class="thickbox" href="../Business/Business_Shedule.aspx?menutype=<%= MenuType %>&Type=<%= Type %>&NewsKey=<%# Eval("NewsKey") %>&KeepThis=true&TB_iframe=true&height=550&width=650">任务分配</a>
                                <% } %>
                                <% if (UserType == 2 || UserType == 3 || UserType == 4) { %>
                                <a style="display:<%# Eval("Type").ToString()!="1"?"block":"none" %>" class="thickbox" href="../Business/Business_Do.aspx?menutype=<%= MenuType %>&Type=<%= Type %>&NewsKey=<%# Eval("NewsKey") %>&KeepThis=true&TB_iframe=true&height=550&width=650">任务处理</a>
		                        <% } %>
		                    </td>
	                       </tr>
                       </AlternatingItemTemplate>
                    </asp:Repeater>
		        </table>
                <uc2:Pager ID="Pager1" runat="server" />
        </td>
    </tr>
</table>
</form>

